package test;

import top.malaoshi.util.Out;
import top.malaoshi.webmvc.utils.MethodUtil;

import java.io.IOException;
import java.lang.reflect.Method;

public class Get2Method {

    public static void main(String[] args) throws ClassNotFoundException, IOException {
        Class<?> clazz = Class.forName("test.LoginCtrl");
        Method[] declaredMethods = clazz.getDeclaredMethods();

        Method[] declaredMethods2 = clazz.getDeclaredMethods();


        for(Method method : declaredMethods) {

            for(Method method2 : declaredMethods2) {

                if(MethodUtil.equals(method,method2)){
                    String allNameOfMethod = MethodUtil.getAllNameOfMethod(method);
                    Out.print("是同一个方法",allNameOfMethod);
                }

            }

        }
    }
}
